<html>
<head>
<script src="http://migandtigav.com/inc/prototype.js" type="text/javascript"></script>
<script type="text/javascript">
nomeat_chinese = Array("lotus and tofu stir fry", "tofu rice pudding", "cheese dips avocado-tofu-egg dip");
meat_chinese = Array("Seafood Stir Fry", "Kung-pao Chicken", "Orange Beef");
nomeat_italian = Array("blue cheese stuffed celery", "spicy eggplant with caramelized onions", "potato and mushroom napoleons");
meat_italian = Array("beef barley soup", "Honey-Soy Grilled Pork Steaks", "Grilled Ham Slice with Plum Glaze");

s_array = new Array();
s_array['nomeat_chinese'] = nomeat_chinese;
s_array['meat_chinese'] = meat_chinese;
s_array['nomeat_italian'] = nomeat_italian;
s_array['meat_italian'] = meat_italian;

function rw_sl ( str ) {
	str = str.replace( ' ', '+');
	var n_str = 'http://www.google.com/search?source=ig&hl=en&q=recipe+'+str;
	return n_str;
}

function rw_fetch() {
	if ( $('meat').checked ) {
		str = 'meat';
	} 
	if ( $('nomeat').checked ) {
		str = 'nomeat';
	} 
	if ( $('chinese').checked ) {
		str = str + '_' + 'chinese';
	} 
	if ( $('italian').checked ) {
		str = str + '_' + 'italian';
	} 
	
	a = s_array[str];

	var ran_number= Math.floor(Math.random()*a.length);
	recipe = a[ran_number];
	s_str = rw_sl(recipe);
	$('rw_result').update('<a href='+s_str+'>'+recipe+'</a>');
	$('rw_button').value = 'Try Again';
}
</script>
</head>
<body>
<div style="text-align:center; width: 99%; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #333 ">

<form id="recipe_form">
<table align=center width="399" height="180" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333; background: transparent url(bg.gif) no-repeat 10px 10px;">
<tr>
<td><input type="radio" name="meat" id="meat" checked value="meat">Meat</td>
<td><input type="radio" name="meat" id="seafood" value="nomeat">Seafood</td>
<td><input type="radio" name="meat" id="vegi" value="nomeat">Vegeterian</td>
</tr>
<tr>
<td><input type="radio" name="type" id="american" checked value="american">American</td>
<td><input type="radio" name="type" id="italian" value="italian">Italian</td>
<td><input type="radio" name="type" id="chinese"  value="chinese">Chinese</td>
</tr>
<tr>
<td colspan=3 align=center>
<div id="rw_result" style="text-align: center; text-decoration: none; font-size: 16px; line-height: 20px; background-color:#FFFF66 ">
</div> 
<div style="margin-top: 4px; ">
<input type="image" src="btn_Imhungry.gif" id="rw_button" onClick="rw_fetch()">
</div>
</td>
</tr>
</table>
</form>
<hr>
<div id="rw_result">
</div> 
</div>

</body>
</html>